package com.eleventwelve.iris.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

import org.opentides.bean.BaseEntity;
import org.opentides.bean.SystemCodes;

/**
 * 
 * @author Ashley
 *
 */
@Entity
@Table(name="PATIENT_DISEASE")
public class PatientDisease extends BaseEntity{
	private static final long serialVersionUID = -5951062580264169285L;

	@ManyToOne
	@JoinColumn(name="DISEASE_ID")
	private Disease disease;
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="DISEASE_STATUS")
	private SystemCodes diseaseStatus;
	
	@ManyToOne
	@JoinColumn(name="PATIENT_ID")
	private Patient patient;
	
	@Temporal(TemporalType.DATE)
	@Column(name="DATE_CURED")
	private Date dateCured;
	
	@Lob
	@Column(name="DESCRIPTION")
	private String description;
	
	@Transient
	private transient boolean isDeleted;

	public boolean getIsDeleted() {
		return isDeleted;
	}

	public void setIsDeleted(boolean isDeleted) {
		this.isDeleted = isDeleted;
	}

	public Disease getDisease() {
		return disease;
	}

	public void setDisease(Disease disease) {
		this.disease = disease;
	}

	public SystemCodes getDiseaseStatus() {
		return diseaseStatus;
	}

	public void setDiseaseStatus(SystemCodes diseaseStatus) {
		this.diseaseStatus = diseaseStatus;
	}

	public Patient getPatient() {
		return patient;
	}

	public void setPatient(Patient patient) {
		this.patient = patient;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Date getDateCured() {
		return dateCured;
	}

	public void setDateCured(Date dateCured) {
		this.dateCured = dateCured;
	}
	
	
	
	
}
